<head>
<link rel="stylesheet" href="/eSDK_OpenAPI_Demo_BS_JAVA/css/tree.css"
	type="text/css">
<link rel="stylesheet"
	href="/eSDK_OpenAPI_Demo_BS_JAVA/css/zTreeStyle.css" type="text/css">
<link rel="stylesheet" href="/eSDK_OpenAPI_Demo_BS_JAVA/css/demo.css"
	type="text/css" />
<link href="/eSDK_OpenAPI_Demo_BS_JAVA/css/thickbox.css" media="screen"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="/eSDK_OpenAPI_Demo_BS_JAVA/js/jquery-1.8.3.js"></script>
<script type="text/javascript"
	src="/eSDK_OpenAPI_Demo_BS_JAVA/js/jquery.ztree.core-3.5.js"></script>
<script src="/eSDK_OpenAPI_Demo_BS_JAVA/js/en-us.js"
	type="text/javascript"></script>
<script src="/eSDK_OpenAPI_Demo_BS_JAVA/js/zh-cn.js"
	type="text/javascript"></script>
<script src="/eSDK_OpenAPI_Demo_BS_JAVA/js/demotools.js"
	type="text/javascript"></script>

<script type="text/javascript">
	function creatediskpool() {
		var id = $("#diskId").val();
		var disknumber = $("#diskNumber").val();
		// 简单参数校验
		if (isEmpty(disknumber)) {
			disknumber = -1;
		} else if (!isNumber(disknumber)) {
			$("#diskNumberErrTip").html(
					controller.language.titles["diskIsNumber"]);
			return false;
		} else {
			$("#diskNumberErrTip").html("");
		}

		$.ajax({
			url : "/eSDK_OpenAPI_Demo_BS_JAVA/openapiServlet",
			type : "post",
			dataType : "json",
			data : "&diskNumber=" + disknumber + "&id=" + id
					+ "&method=createDiskPool",
			async : false,
			success : function(data) {
				if ("success" == data) {
					self.parent.tb_remove();
				} else {
					$("#diskpool_status").html(data);
				}
			},
			error : function(data) {
				$("#diskpool_status").html(
						controller.language.titles["operationFailed"]);
			},
			beforeSend : function() {
				$("#diskpool_status").html("");
			}
		});
	}
	function load() {
		changeLang();
	}
</script>
</head>
<body onload="load()">
	<div class="inoutput_param_div1">
		<table width="100%">
			<tr>
				<td width="10%"></td>
				<td></td>
				<td width="32%"></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td align="left" width="25%"><label id="idLabel">ID:</label></td>
				<td align="left"><input type="text" id="diskId" name="diskId"></td>
				<td align="left"></span></td>
			</tr>
			<tr>
				<td></td>
				<td align="left" width="25%"><label id="diskNumberLabel">所选硬盘数：</label></td>
				<td align="left"><input type="text" id="diskNumber"
					name="diskNumber"></td>
				<td align="left"><span class="span_tip" id="diskNumberErrTip">
				</span></td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td align="left"><input class="btn"
					onmouseover="this.className='btn_mouseover'"
					onmouseout="this.className='btn'" type="button"
					id="creatediskpoolBtn" onclick="creatediskpool();" value="创建硬盘域"></td>
				<td></td>
			</tr>
			<tr>
				<td colspan="2"></td>
				<td align="left"><label algin="left" id="diskpool_status"
					name="diskpool_status"> </label></td>
				<td></td>
			</tr>
		</table>
	</div>
</body>


